/*
 * Created on May 2, 2005
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package org.vectrics.skill;

import java.util.Comparator;

/**
 * @author MMoore
 */
public class PersonSkillScoreCompare implements Comparator {

	/**
	 * 
	 */
	public PersonSkillScoreCompare() {
		super();
	}

	public int compare(Object o1, Object o2) {
		PersonSkillScore s1 = (PersonSkillScore)o1;
		PersonSkillScore s2 = (PersonSkillScore)o2;
		int result = s1.getScore().compareTo(s2.getScore());
		if (result == 0)
			result = s1.getSkill().getCode().compareTo(s2.getSkill().getCode());
		return result;
	}

}
